﻿namespace Aeon.Emulator.Sound.FM.Channels
{
    /// <summary>
    /// Placeholder OPL channel that generates no output.
    /// </summary>
    internal sealed class NullChannel : Channel
    {
        /// <summary>
        /// The null channel instance.
        /// </summary>
        public static readonly NullChannel Value = new NullChannel();

        /// <summary>
        /// Prevents a default instance of the <see cref="NullChannel"/> class from being created.
        /// </summary>
        private NullChannel()
            : base(0, null)
        {
        }

        protected override double GetChannelOutput()
        {
            return 0;
        }
        /// <summary>
        /// Activates channel output.
        /// </summary>
        protected override void KeyOn()
        {
        }
        /// <summary>
        /// Disables channel output.
        /// </summary>
        protected override void KeyOff()
        {
        }
        /// <summary>
        /// Updates the state of all of the operators in the channel.
        /// </summary>
        protected override void UpdateOperators()
        {
        }
    }
}
